<!-- <include file="public@header" />
 -->
</head>
<body>
<style type="text/css">
td{  text-align:center;}
/*td {background-color: #00ff00}*/
</style>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
	
			<li class="active" id="list"><a href="{:url('Park/index')}">孵化器</a></li>
			<li><a href="{:url('Park/addPark')}">添加</a></li>
			<!-- 	<li><a href="{:url('user/add')}">{:lang('ADMIN_USER_ADD')}</a></li> -->
		</ul>
		<form class="well form-inline margin-top-20" metdod="post" action="{:url('Park/index')}">
		
			孵化器性质:
			<select class="form-control" name="incubator_type" style="widtd: 140px;">
				<option value='0'>全部</option>
				<option value="1">园区</option>
				<option value="2">众创</option>

			</select> &nbsp;&nbsp;


             时间:
            <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
            value="{$start_time|default=''}"
            style="width: 140px;" autocomplete="off">-
            <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
            value="{$end_time|default=''}"
            style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
   
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:url('Park/index')}">清空</a>
		</form>
		<table class="table  " style="margin:auto">
			<tbody>

			   <tr>
					<td style="display:table-cell; vertical-align:middle" widtd="50">{$list.total_order}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_rent}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.actual_total_rent}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_area}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_customer}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td>
				</tr>
				<tr>
                <!-- style="display:table-cell; vertical-align:middle" -->
					<td style="display:table-cell; vertical-align:middle" widtd="50" >总订单数</td>
					<td style="display:table-cell; vertical-align:middle">押金总额</td>
					<td style="display:table-cell; vertical-align:middle">实收总额</td>
					<td style="display:table-cell; vertical-align:middle">总成交面积</td>
					<td style="display:table-cell; vertical-align:middle">总入孵企业</td>
					<td style="display:table-cell; vertical-align:middle">租金总额</td>
					<td style="display:table-cell; vertical-align:middle">押金总额</td>
					
				</tr>
				<tr>
					<td style="display:table-cell; vertical-align:middle" widtd="50"></td>
					<td style="display:table-cell; vertical-align:middle"></td>
					<td style="display:table-cell; vertical-align:middle"></td>
					<td style="display:table-cell; vertical-align:middle"></td>
					<td style="display:table-cell; vertical-align:middle"></td>
					<td style="display:table-cell; vertical-align:middle"></td>
					<td style="display:table-cell; vertical-align:middle"></td>
					<td style="display:table-cell; vertical-align:middle" widtd="130"></td>
				</tr>
			
				<!-- 	<php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php> -->
				<tr>
					<td style="display:table-cell; vertical-align:middle" widtd="50">{$list.total_customer}</td>
					<td style="display:table-cell; vertical-align:middle"><div id="mains" style="width: 300px;height:200px;"></div></td>
					<td style="display:table-cell; vertical-align:middle"><div id="main" style="width: 300px;height:200px;"></div></td>
					<td style="display:table-cell; vertical-align:middle"><div id="link" style="width: 300px;height:200px;"></div></td>
					<!-- <td style="display:table-cell; vertical-align:middle">{$list.total_customer}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td> -->
				</tr>
				<tr>
					<td style="display:table-cell; vertical-align:middle" widtd="50">总客户数</td>
					<td style="display:table-cell; vertical-align:middle">客户领域</td>
					<td style="display:table-cell; vertical-align:middle">客户阶段</td>
					<td style="display:table-cell; vertical-align:middle">入孵渠道</td>
					
					
				</tr>
				
             <tr>
               <td style="display:table-cell; vertical-align:middle" widtd="50"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle" widtd="130"></td>
           </tr>

           <!-- 	<php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php> -->
           <tr>
             <td style="display:table-cell; vertical-align:middle" widtd="50">{$list.park_space_area}</td>
             <td style="display:table-cell; vertical-align:middle">{$list.park_space_num}</div></td>
             <td style="display:table-cell; vertical-align:middle"><div id="park_rent" style="width: 300px;height:200px;"></div></td>
             <td style="display:table-cell; vertical-align:middle"><div id="empty" style="width: 300px;height:200px;"></div></td>
					<!-- <td style="display:table-cell; vertical-align:middle">{$list.total_customer}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td>
					<td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td> -->
			</tr>
			<tr>
				<td style="display:table-cell; vertical-align:middle" widtd="50">总面积</td>
				<td style="display:table-cell; vertical-align:middle">园区总办公室数</td>
				<td style="display:table-cell; vertical-align:middle">已租/未租</td>
				<td style="display:table-cell; vertical-align:middle">空置率</td>
					
					
			</tr>
            <tr>
               <td style="display:table-cell; vertical-align:middle" widtd="50"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle" widtd="130"></td>
           </tr>

           <!--     <php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php> -->
           <tr>
             <td style="display:table-cell; vertical-align:middle" widtd="50">{$list.station_num}</td>
             <td style="display:table-cell; vertical-align:middle">{$list.space_num}</div></td>
             <td style="display:table-cell; vertical-align:middle"><div id="emptys" style="width: 300px;height:200px;"></div></td>
             <td style="display:table-cell; vertical-align:middle"><div id="emptyroom" style="width: 300px;height:200px;"></div></td>
                    <!-- <td style="display:table-cell; vertical-align:middle">{$list.total_customer}</td>
                    <td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td>
                    <td style="display:table-cell; vertical-align:middle">{$list.total_deposit}</td> -->
            </tr>
            <tr>
                <td style="display:table-cell; vertical-align:middle" widtd="50">总工位数</td>
                <td style="display:table-cell; vertical-align:middle">园区总办公室数</td>
                <td style="display:table-cell; vertical-align:middle">工位空置率</td>
                <td style="display:table-cell; vertical-align:middle">办公室空置率</td>
                    
                    
            </tr>
            <tr>
               <td style="display:table-cell; vertical-align:middle" widtd="50"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle" widtd="130"></td>
            </tr>

           <!--     <php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php> -->
            <tr>
             <td style="display:table-cell; vertical-align:middle" widtd="50"><div id="reason" style="width: 300px;height:200px;"></td>
             <td style="display:table-cell; vertical-align:middle"><div id="monthlost" style="width: 300px;height:200px;"></td>
            </tr>
            <tr>
                <td style="display:table-cell; vertical-align:middle" widtd="50">退租原因</td>
                <td style="display:table-cell; vertical-align:middle">月退租数</td>
            </tr>
                  <tr>
               <td style="display:table-cell; vertical-align:middle" widtd="50"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle"></td>
               <td style="display:table-cell; vertical-align:middle" widtd="130"></td>
            </tr>

           <!--     <php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php> -->
            <tr>
             <td style="display:table-cell; vertical-align:middle" widtd="50">{$list.site_num}</td>
             <td style="display:table-cell; vertical-align:middle"></td>
            </tr>
            <tr>
                <td style="display:table-cell; vertical-align:middle" widtd="50">总场地数</td>
                <td style="display:table-cell; vertical-align:middle"></td>
            </tr>
				
			
			</tbody>
		</table>
	
	</div>

	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/js/echarts.js"></script>
</body>
<body>
    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
   
      <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        
        var myChart = echarts.init(document.getElementById('mains'));
        var myCharts = echarts.init(document.getElementById('main'));
        var myChartl = echarts.init(document.getElementById('link'));
        var myChartp = echarts.init(document.getElementById('park_rent'));
         var myChartr = echarts.init(document.getElementById('reason'));
        // myChart.setOption({
        // 	tooltip : {
        // 		trigger: 'item',
        // 		formatter: "{a} <br/>{b} : {c} ({d}%)"
        // 	},
        // 	series : [
        // 	{
        // 		name: '访问来源',
        // 		type: 'pie',
        // 		radius : '55%',
        // 		center: ['50%', '60%'],
        // 		data:[
        // 		{value:335, name:'直接访问'},
        // 		{value:310, name:'邮件营销'},
        // 		{value:234, name:'联盟广告'},
        // 		{value:135, name:'视频广告'},
        // 		{value:1548, name:'搜索引擎'}
        // 		],
        // 		itemStyle: {
        // 			emphasis: {
        // 				shadowBlur: 10,
        // 				shadowOffsetX: 0,
        // 				shadowColor: 'rgba(0, 0, 0, 0.5)'
        // 			}
        // 		}
        // 	}
        // 	]
        //  })







        var showarr=[];
        var showobj={};	
        $.post("{:url('Summary/customerFields')}",{},function(data,status){
        	$.each(data,function(i,j){

        		//alert(i);
        		//alert(j);
        		showobj={value:j.count,name:j.name};
        		showarr.push(showobj);		
        		//alert(data);

        		
        	})
        	// console.log(showarr);
        	chart(myChart,showarr);
        	

        })

        var showarrs=[];
        var showobjs={};	
        $.post("{:url('Summary/customerStage')}",{},function(data,status){
        	$.each(data,function(i,j){

        		//alert(i);
        		//alert(j);
        		showobjs={value:j.count,name:j.name};
        		showarrs.push(showobjs);		
        		//alert(data);

        		
        	})
        	// console.log(showarr);
        	chart(myCharts,showarrs);
        	

        })
        var showarrl=[];
        var showobjl={};	
        $.post("{:url('Summary/linkRate')}",{},function(data,status){
        	$.each(data,function(i,j){

        		//alert(i);
        		//alert(j);
        		showobjl={value:j.count,name:j.name};
        		showarrl.push(showobjl);		
        		//alert(data);

        		
        	})
        	// console.log(showarr);
        	chart(myChartl,showarrl);
        	

        })
        var showarrr=[];
        var showobjr={};    
        $.post("{:url('Summary/lostRent')}",{},function(data,status){
            $.each(data,function(i,j){

                //alert(i);
                //alert(j);
                showobjr={value:j.count,name:j.name};
                showarrr.push(showobjr);        
                //alert(data);

                
            })
            // console.log(showarr);
            chart(myChartr,showarrr);
            

        })
        var showarrp=[];
        var showobjp={};	
        $.post("{:url('Summary/rentRate')}",{},function(data,status){
        	$.each(data,function(i,j){

        		//alert(i);
        		//alert(j);
        		showobjp={value:j.count,name:j.name};
        		showarrp.push(showobjp);		
        		//alert(data);

        		
        	})
        
        	chart(myChartp,showarrp);
        	

        })
        function chart(myChartl,data){

        	myChartl.setOption({
        		tooltip : {
        			trigger: 'item',
        			formatter: "{a} <br/>{b} : {c} ({d}%)"
        		},
        		series : [
        		{
        			name: '访问来源',
        			type: 'pie',
        			radius : '55%',
        			center: ['50%', '60%'],
        			data:data,
        			itemStyle: {
        				emphasis: {
        					shadowBlur: 10,
        					shadowOffsetX: 0,
        					shadowColor: 'rgba(0, 0, 0, 0.5)'
        				}
        			}
        		}
        		]
        	})






        }
        var myChartempty = echarts.init(document.getElementById('empty'));

        var showarrp1=[];
        var showarrp2=[];
        var showobjp={};	
        $.post("{:url('Summary/parkRate')}",{},function(data,status){
        	$.each(data,function(i,j){

        		//alert(i);
        		//alert(j);
        		//showobjp={value:j.count,name:j.name};
        		showarrp1.push(j.month);	
        		showarrp2.push(j.rate);	
        		//alert(data);

        		
        	})
        	//  console.log(showarrp1);
        	chart_line(myChartempty,showarrp1,showarrp2);
        	

        })

        var myChartsempty = echarts.init(document.getElementById('emptys'));

        var showarrps=[];
        var showarrps2=[];
        var showobjps={};    
        $.post("{:url('Summary/parkRate')}",{type:2,sit:2},function(data,status){
            $.each(data,function(i,j){

                //alert(i);
                //alert(j);
                //showobjp={value:j.count,name:j.name};
                showarrps.push(j.month); 
                showarrps2.push(j.rate); 
                //alert(data);

                
            })
              
            chart_line(myChartsempty,showarrps,showarrps2);
            

        })
        var myChartroom = echarts.init(document.getElementById('emptyroom'));

        var showarrproom=[];
        var showarrproom2=[];
        $.post("{:url('Summary/parkRate')}",{type:2},function(data,status){
            $.each(data,function(i,j){

                //alert(i);
                //alert(j);
                //showobjp={value:j.count,name:j.name};
                showarrproom.push(j.month); 
                showarrproom2.push(j.rate); 
                //alert(data);

                
            })
                // console.log(showarrroom);
                chart_line(myChartroom,showarrproom,showarrproom2);


            })

            var myChartlost = echarts.init(document.getElementById('monthlost'));

            var showarrlost=[];
            var showarrlost2=[];
            $.post("{:url('Summary/monthLost')}",{},function(data,status){
            $.each(data,function(i,j){

                //alert(i);
                //alert(j);
                //showobjp={value:j.count,name:j.name};
                showarrlost.push(j.month); 
                showarrlost2.push(j.count); 
                //alert(data);

                
            })
                // console.log(showarrroom);
                chart_line(myChartlost,showarrlost,showarrlost2);


            })




















        function chart_line(myChartp,data1,data2){

        	myChartp.setOption({
        		title: {
        			text: ''
        		},
        		tooltip : {
        			trigger: 'axis',
        			axisPointer: {
        				type: 'cross',
        				label: {
        					backgroundColor: '#6a7985'
        				}
        			}
        		},
        		toolbox: {
        			feature: {
        				saveAsImage: {}
        			}
        		},
        		grid: {
        			left: '3%',
        			right: '4%',
        			bottom: '3%',
        			containLabel: true
        		},
        		xAxis : [
        		{
        			type : 'category',
        			boundaryGap : false,
        			data :data1
        		}
        		],
        		yAxis : [
        		{
        			type : 'value'
        		}
        		],
        		series : [
        		{
        			name:'搜索引擎',
        			type:'line',
        			stack: '总量',
        			label: {
        				normal: {
        					show: true,
        					position: 'top'
        				}
        			},
        			data:data2
        		}
        		]
        	});



        }
        	
        // 使用刚指定的配置项和数据显示图表。
       //myChart.setOption(option);

    </script>
</body>
</html>
<!-- <script>
	$(function(){

	})
	$(".del").click(
	    function(){
	    if(confirm("确认要删除吗")){
	    	    var id=$(tdis).attr("id");
	    	    $.post("{:url('delPark')}",
	    		{id:id},
	    		function(data,status){

	    			location.href="{:url('index')}";
	    		});
	    }
		
		
	    }
	);



</script> -->